/*  1:   */ package org.jetbrains.debugger.values;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.util.AsyncResult;
import com.intellij.openapi.util.AsyncValueLoaderManager;
import com.intellij.util.ThreeState;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.debugger.Variable;

import java.util.List;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public abstract class ObjectValueBase<VALUE_LOADER extends ValueManager>
/* 12:   */   extends ValueBase
/* 13:   */   implements ObjectValue
/* 14:   */ {
/* 15:14 */   private static final AsyncValueLoaderManager<ObjectValueBase, List<Variable>> a = new AsyncValueLoaderManager(ObjectValueBase.class)
/* 16:   */   {
/* 17:   */     public boolean isUpToDate(@NotNull ObjectValueBase paramAnonymousObjectValueBase, @NotNull List<Variable> paramAnonymousList)
/* 18:   */     {
/* 19:18 */       if (paramAnonymousObjectValueBase == null) {
/* 20:18 */         throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/debugger/values/ObjectValueBase$1", "isUpToDate" }));
/* 21:   */       }
/* 22:18 */       if (paramAnonymousList == null) {
/* 23:18 */         throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/debugger/values/ObjectValueBase$1", "isUpToDate" }));
/* 24:   */       }
/* 25:18 */       return paramAnonymousObjectValueBase.valueManager.getCacheStamp() == paramAnonymousObjectValueBase.c;
/* 26:   */     }
/* 27:   */     
/* 28:   */     public void load(@NotNull ObjectValueBase paramAnonymousObjectValueBase, @NotNull AsyncResult<List<Variable>> paramAnonymousAsyncResult)
/* 29:   */     {
/* 30:23 */       if (paramAnonymousObjectValueBase == null) {
/* 31:23 */         throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/debugger/values/ObjectValueBase$1", "load" }));
/* 32:   */       }
/* 33:23 */       if (paramAnonymousAsyncResult == null) {
/* 34:23 */         throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/debugger/values/ObjectValueBase$1", "load" }));
/* 35:   */       }
/* 36:23 */       paramAnonymousObjectValueBase.loadProperties(paramAnonymousAsyncResult);
/* 37:   */     }
/* 38:   */   };
/* 39:   */   private volatile AsyncResult<List<? extends Variable>> b;
/* 40:30 */   private volatile int c = -1;
/* 41:   */   protected final VALUE_LOADER valueManager;
/* 42:   */   
/* 43:   */   public ObjectValueBase(@NotNull ValueType paramValueType, @NotNull VALUE_LOADER paramVALUE_LOADER)
/* 44:   */   {
/* 45:35 */     super(paramValueType);
/* 46:   */     
/* 47:37 */     this.valueManager = paramVALUE_LOADER;
/* 48:   */   }
/* 49:   */   
/* 50:   */   protected abstract void loadProperties(@NotNull AsyncResult<List<Variable>> paramAsyncResult);
/* 51:   */   
/* 52:   */   protected final void updateCacheStamp()
/* 53:   */   {
/* 54:43 */     this.c = this.valueManager.getCacheStamp();
/* 55:   */   }
/* 56:   */   
/* 57:   */   @NotNull
/* 58:   */   public final AsyncResult<List<Variable>> getProperties()
/* 59:   */   {
/* 60:49 */     AsyncResult tmp7_4 = a.get(this);
/* 61:49 */     if (tmp7_4 == null) {
/* 62:49 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/debugger/values/ObjectValueBase", "getProperties" }));
/* 63:   */     }
/* 64:49 */     return tmp7_4;
/* 65:   */   }
/* 66:   */   
/* 67:   */   @Nullable
/* 68:   */   public String getValueString()
/* 69:   */   {
/* 70:55 */     return null;
/* 71:   */   }
/* 72:   */   
/* 73:   */   @NotNull
/* 74:   */   public ThreeState hasProperties()
/* 75:   */   {
/* 76:61 */     ThreeState tmp3_0 = ThreeState.UNSURE;
/* 77:61 */     if (tmp3_0 == null) {
/* 78:61 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/debugger/values/ObjectValueBase", "hasProperties" }));
/* 79:   */     }
/* 80:61 */     return tmp3_0;
/* 81:   */   }
/* 82:   */   
/* 83:   */   public int getCacheStamp()
/* 84:   */   {
/* 85:66 */     return this.c;
/* 86:   */   }
/* 87:   */   
/* 88:   */   public void clearCaches()
/* 89:   */   {
/* 90:71 */     this.c = -1;
/* 91:72 */     a.reset(this);
/* 92:   */   }
/* 93:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.debugger.values.ObjectValueBase

 * JD-Core Version:    0.7.0.1

 */